using System.Collections;
using UnityEngine;

public class OnlyOnEnableForObject : MonoBehaviour
{
	public float deActiveTimer;

	private void OnEnable()
	{
		StartCoroutine(IE_DeActive());
	}

	private IEnumerator IE_DeActive()
	{
		yield return new WaitForSeconds((deActiveTimer != 0f) ? deActiveTimer : 1f);
		base.gameObject.SetActive(false);
	}
}
